/************************************************
*
*   filename:   action.cpp
*   date:       11/12/09
*
*   Created by
*       Kassandra Kaplan
*
*   purpose:
*       contains the action class
*
*   Revisions:
*       - 11/12/09
*            Ceated header
*
*
*   copyright 2009 by
*       Cy Cook
*       Kassandra Kaplan
*       Blaise Millegan
*       Jason Stafford
*
************************************************/

#include "action.h"

using namespace std;


void action::set_action(int subj, int task, int target)
{
    to_do->subject = subj;
    to_do->verb = task;
    to_do->direct_object = target;
}

void action::set_subject(int subj)
{
    to_do->subject = subj;
}

void action::set_verb(int task)
{
    to_do->verb = task;

}

void action::set_direct_object(int target)
{
    to_do->direct_object = target;
}

bool action::do_action(game_info * info)
{
    bool success = true;
    switch(to_do->subject)
    {
        case player_one:
        do_player(info->party_one->player_one, info);
        break;

        case player_two:
        do_player(info->party_one->player_two, info);
        break;

        case player_three:
        do_player(info->party_one->player_three, info);
        break;

        case enemy_one:
        do_enemy(info->enemy_one, info);
        break;
        case noone:
        // void action
        break;
        default:
        success = false;
        break;
    }

    return success;
}

bool action::do_player(character *player,game_info *info)
{
    bool success= true;
    return success;
}

bool action::do_enemy(enemy *foe, game_info *info)
{
    bool success= true;
    return success;
}

